#include <iostream>
#include <signal.h>
volatile int flag = 0;
void handler(int signo)
{
    std::cout << "signo" << signo << std::endl;
    flag = 1;
}
int main()
{
    signal(2, handler);
    std::cout << "start" << std::endl;
    while(!flag);
    std::cout << "end" << std :: endl;
    
    return 0;
}